﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMasterPage.Master" AutoEventWireup="true" CodeBehind="GradeLevel.aspx.cs" Inherits="OpenSIS.School.GradeLevel" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

 <div>
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td>
                    <asp:Label CssClass="page_heading_black" ID="lblmsg" runat="server" meta:resourcekey="lblmsg"></asp:Label>
                </td>
                <td align="right">
                    <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td>
                                <asp:ImageButton ID="imgbtnAdd" ImageUrl="~/App_Themes/main/images/add.png" runat="server"
                                    CausesValidation="false" />
                            </td>
                            <td>
                                <img src="../App_Themes/main/images/icon_separator.png" />
                            </td>
                            <td>
                                <asp:ImageButton ID="imgbtnEdit" ImageUrl="~/App_Themes/main/images/edit.png" runat="server"
                                    CausesValidation="false" OnClick="imgbtnEdit_Click" />
                            </td>
                            <td>
                                <img src="../App_Themes/main/images/icon_separator.png" />
                            </td>
                            <td>
                                <asp:ImageButton ID="imgbtnDelete" ImageUrl="~/App_Themes/main/images/delete.png"
                                    runat="server" CausesValidation="false" OnClick="imgbtnDelete_Click" OnClientClick="if(!confirm('Are you sure ?')){return false;}" />
                            </td>
                        </tr>
                    </table>
                    <div class="clear_m">
                </div>
                </td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    
                  <div class="ClsReorderListContainer">
        
        

        <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td class="grid_header_color">
            <table width="100%" cellpadding="0" cellspacing="0">
                <tr>
                  <td class="grid_header_left"></td>
                  <td class="grid_header">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="2%">&nbsp;</td>
                        <td width="3%" class="grid_header_txt" align="center"><asp:CheckBox ID="chkall" runat="server" onclick="javascript:SelectDeselectAllCheckboxes(this);" meta:resourcekey="chkall"/></td>
                        <td width="65%" class="grid_header_txt"><asp:Literal ID="ML_0007" runat="server" meta:resourcekey="ML_0007">Grade Name</asp:Literal></td>
                        <td width="15%" class="grid_header_txt"><asp:Literal ID="ML_0008" runat="server" meta:resourcekey="ML_0008">Short Name</asp:Literal></td>
                        <td width="15%" class="grid_header_txt"><asp:Literal ID="ML_0009" runat="server" meta:resourcekey="ML_0009">Next Grade</asp:Literal></td>
                    </tr>
                 </table>
                  </td>
                  <td class="grid_header_right"></td>                                                
                </tr>
             </table>
        
        </td></tr></table>
        
        <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
        
        <tr>
        <td align="left" class="blue_content2">
        
<cc1:ReorderList ID="rlGradeLevel" runat="server" DragHandleAlignment="Left" ItemInsertLocation="End" 
 DataKeyField="grd_lvl_id" SortOrderField="Priority" EnableViewState="true" 
                OnItemReorder="rlGradeLevel_ItemReorder" CallbackCssStyle="ClsCallBackStyle" 
              
                onitemdatabound="rlGradeLevel_ItemDataBound"  PostBackOnReorder="true">
                  <DragHandleTemplate>
                                        <div class="ClsDragHandle"></div>
                                      </DragHandleTemplate>
                    <ItemTemplate>
                        <div>
                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                           
                            <tr>
                                <td class="grid_bg">

                                      <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                                <tr>

                                                    <td width="2%" align="left" class="padding_gen_small grid_b_border">                                  
                                                        <asp:CheckBox ID="chkrow" runat="server" meta:resourcekey="chkrow"/>
                                                        <asp:HiddenField ID="hdnGrdLevelId" runat="server" Value='<%#Eval("grd_lvl_id") %>' />
                                                    </td>
                                                    <td width="65%" class="padding_gen_small grid_b_border">
                                                        <asp:Label ID="lblTitle" runat="server" Text='<%#Eval("grd_lvl_nm")%>' ></asp:Label>
                                                    </td>
                                                    <td width="15%" align="left" class="padding_gen_small grid_b_border">
                                                        <asp:Label ID="lblShortName" Text='<%#Eval("grd_lvl_short_nm") %>' runat="server"></asp:Label>
                                                    </td>
                                                    <td width="15%" align="left" class="padding_gen_small grid_b_border">
                                                        <asp:HiddenField ID="hndNextGradeId" runat="server" Value='<%#Eval("grd_lvl_id_next")%>' />
                                                        <asp:Label ID="lblNextGrade" runat="server" Text='<%#Eval("Next_grade")%>'></asp:Label>
                                                    </td>
                                                </tr>
                                       </table>  
                                       
                                </td>                                
                            </tr>
                            </table>
                        </div>
                    </ItemTemplate>
                    <ReorderTemplate>
                        <asp:Panel ID="Panel2" runat="server" CssClass="ClsReorderCue">
                        </asp:Panel>
                    </ReorderTemplate>

                    

                    <EmptyListTemplate >
                       <table width="100%" cellpadding="0" cellspacing="0" border="0">
                            <tr><td align="center" class="grid_bg">
                                                                <span class="blue_large"><asp:Literal ID="ML_0018" runat="server" meta:resourcekey="ML_0018">No Data Found</asp:Literal></span>
                                                                </td></tr></table>
                    
                    
                    
                    </EmptyListTemplate>
             </cc1:ReorderList>
              </td>
        </tr>
        </table>
           </div>
                    
                   
                </td>
            </tr>
        </table>
        
          <asp:Panel ID="panelwronusernm" runat="server" Style="display: none;"
                Width="292" Height="165">
                <table cellpadding="0" cellspacing="0">
                    <tr>
                        <td class="alert_ltop"></td>
                        <td style="background-color:#fff; border-top:2px solid #645d5d;">&nbsp;</td>
                        <td class="alert_rtop"></td>
                    </tr>
                    <tr>
                        <td style="background-color:#fff; border-left:2px solid #645d5d;">&nbsp;</td>
                        <td class="alert_modal_bg">
                               <div style="text-align:center; padding:20px 0px 10px 0px; ">
                                
                    <asp:Label ID="lblerrmsg" runat="server" Font-Bold="true" ForeColor="Red" meta:resourcekey="lblerrmsg"></asp:Label>
                               
                               </div>
                        <div class="clear"></div>
                            <div class="separator_hor"></div>
                            <div align="center">
                             <asp:Button ID="Button1" runat="server" CssClass="modalbtn_active" Text="Ok" CausesValidation="false" />
                            </div>
                        </td>
                        <td style="background-color:#fff; border-right:2px solid #645d5d;">&nbsp;</td>
                    </tr>
                    <tr>
                        <td class="alert_lbottom"></td>
                        <td style="background-color:#fff; border-bottom:2px solid #645d5d;">&nbsp;</td>
                        <td class="alert_rbottom"></td>
                    </tr>
                </table>

            </asp:Panel>
        
        <cc1:ModalPopupExtender ID="mdlpopwronusernm" runat="server" BackgroundCssClass="Inactive"
                TargetControlID="hdn" PopupControlID="panelwronusernm" Enabled="false" />
                
                 <asp:HiddenField ID="hdn" runat="server" />
        
        
        
        <asp:Panel ID="panel_Popup" runat="server" style="display:none;" CssClass="ModalPopup" Width="500" Height="208">
            <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td class="modal_header_left bottom_black">&nbsp;</td>
                        <td class="modal_header_bg" valign="top"><div class="modal_header"><asp:Literal ID="ML_0021" runat="server" meta:resourcekey="ML_0021">Add Grade Level</asp:Literal></div></td>
                    </tr>
                    <tr>
                        <td class="modal_rtgrey">&nbsp;</td>
                        <td class="modal_bg">
                                <div style="overflow:auto; overflow-x:hidden; width:390px; height:100px;">
                        <table align="left" cellpadding="4" cellspacing="0" width="100%">
                            <tr>
                                <td>
                                    <asp:Literal ID="ML_0022" runat="server" meta:resourcekey="ML_0022">Title</asp:Literal>
                                </td>
                                <td class="colon"><asp:Literal ID="ML_0023" runat="server" meta:resourcekey="ML_0023">:</asp:Literal></td>
                                <td>
                                    <asp:TextBox CssClass="textbox1" ID="txtPreGradeLevelAdd" runat="server" meta:resourcekey="txtPreGradeLevelAdd"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Literal ID="ML_0025" runat="server" meta:resourcekey="ML_0025">Short Name</asp:Literal>
                                </td>
                                <td class="colon"><asp:Literal ID="ML_0026" runat="server" meta:resourcekey="ML_0026">:</asp:Literal></td>
                                <td>
                                    <asp:TextBox CssClass="textbox1" ID="txtShortNameAdd" runat="server" meta:resourcekey="txtShortNameAdd"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Literal ID="ML_0028" runat="server" meta:resourcekey="ML_0028">Next Grade</asp:Literal>
                                </td>
                                <td class="colon"><asp:Literal ID="ML_0029" runat="server" meta:resourcekey="ML_0029">:</asp:Literal></td>
                                <td>
                                    <asp:DropDownList CssClass="dropdown" ID="ddlNextGradeAdd" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                            </tr>
                        </table></div>
                    <div class="separator_hor"></div>
                        <table cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td align="right"><asp:Button ID="btnSave" runat="server" CssClass="modalbtn_active" Text="Save" CausesValidation="false"
                                OnClick="btnSave_Click" meta:resourcekey="btnSave"/>&nbsp;
                                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" CausesValidation="false"
                                CssClass="modalbtn_active" OnClick="btnCancel_Click" meta:resourcekey="btnCancel" OnClientClick="hidePopup('ctl00_ContentPlaceHolder1_ModalPopupExtender1')"/></td>
                                </tr>
                            </table>                        
                        </td>
                      </tr>
                </table>            
                               
 
                    

        </asp:Panel>
        <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="Inactive"
            TargetControlID="imgbtnAdd" PopupControlID="panel_Popup" />
        <asp:Panel ID="panelEdit" runat="server" style="display:none;" CssClass="ModalPopup" Width="500" Height="208">
            <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td class="modal_header_left bottom_black">&nbsp;</td>
                        <td class="modal_header_bg" valign="top"><div class="modal_header"><asp:Literal ID="ML_0035" runat="server" meta:resourcekey="ML_0035">Edit Grade Level</asp:Literal></div></td>
                    </tr>
                    <tr>
                        <td class="modal_rtgrey">&nbsp;</td>
                        <td class="modal_bg">
           
            <div style="overflow:auto; overflow-x:hidden; width:390px; height:100px;">            
            <table align="left" cellpadding="4" cellspacing="0">
                <tr>
                    <td>
                        <asp:Literal ID="ML_0036" runat="server" meta:resourcekey="ML_0036">Title</asp:Literal>
                    </td>
                    <td class="colon"><asp:Literal ID="ML_0037" runat="server" meta:resourcekey="ML_0037">:</asp:Literal></td>
                    <td>
                        <asp:TextBox CssClass="textbox1" ID="txtTitleEdit" runat="server" meta:resourcekey="txtTitleEdit"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Literal ID="ML_0039" runat="server" meta:resourcekey="ML_0039">Short Name</asp:Literal>
                    </td>
                    <td class="colon"><asp:Literal ID="ML_0040" runat="server" meta:resourcekey="ML_0040">:</asp:Literal></td>
                    <td>
                        <asp:TextBox CssClass="textbox1" ID="txtShortNameEdit" runat="server" meta:resourcekey="txtShortNameEdit"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Literal ID="ML_0042" runat="server" meta:resourcekey="ML_0042">Next Grade</asp:Literal>
                    </td>
                    <td class="colon"><asp:Literal ID="ML_0043" runat="server" meta:resourcekey="ML_0043">:</asp:Literal></td>
                    <td>
                        <asp:DropDownList CssClass="dropdown" ID="ddlNextGradeEdit" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                </tr>
            </table></div>
            
            <div class="separator_hor"></div>
                <table cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td align="right">
                        <asp:Button ID="btnUpdate" runat="server" CssClass="modalbtn_active" Text="Update" 
                            CausesValidation="false" onclick="btnUpdate_Click" meta:resourcekey="btnUpdate"/>
                        <asp:Button ID="btnCancelEdit" runat="server" Text="Cancel" CssClass="modalbtn_active" 
                            onclick="btnCancelEdit_Click" meta:resourcekey="btnCancelEdit" OnClientClick="hidePopup('ctl00_ContentPlaceHolder1_ModalPopupExtender2')"/>
                        </td>
                    </tr>
                </table>
                </td></tr>
            </table>
            
        </asp:Panel>
        <cc1:ModalPopupExtender ID="ModalPopupExtender2" runat="server" BackgroundCssClass="Inactive"
            TargetControlID="imgbtnEdit" PopupControlID="panelEdit" Enabled="false" />
    </div>

</asp:Content>
